package ch05.shiLi.service.Impl;

import ch05.shiLi.dao.Impl.UserDaoImpl;
import ch05.shiLi.dao.UserDao;
import ch05.shiLi.factory.UserDaoFactory;
import ch05.shiLi.service.UserService;
import ch05.shiLi.util.User;

public class UserServiceImpl implements UserService {
private UserDao userDao= UserDaoFactory.getInstance();

    /**
     * 保存用户
     * @param user
     */
    @Override
    public void save(User user) {
        userDao.save(user);
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
}
